Skip to content

feat(P1): S1 回踩进场 + S2 部署回测 + dry-run 开机即跑 - #1

Draft
toolazytoname wants to merge 1 commit into
mainfrom
cursor/s1-s2-dry-run-453f
Draft

feat(P1): S1 回踩进场 + S2 部署回测 + dry-run 开机即跑#1
toolazytoname wants to merge 1 commit into
mainfrom
cursor/s1-s2-dry-run-453f

Conversation

@toolazytoname

Copy link
Copy Markdown
Owner

按 2026-08-13 三项拍板落地:不接受 S1 长期沉默部署并回测 S2dry-run 开机即跑

详细数字与读法见 docs/system/08-s1-s2-backtest.md

改了什么

S1

  • 进场:金叉 上升趋势中收盘重新站上 EMA50(ADX>25 仍过滤)
  • 宇宙:静态 15 个 USDT 现货(排除稳定币和 BNB)
  • 周期仍是 1d(一次只拧两个旋钮)
  • 研究回测(Yahoo 日线 2020-06→2026-08):161 笔(2024 年后 77 笔进场),胜率 27%,平均盈亏 -3.1%
  • 沉默治好了;更勤快的代价是期望变差

S2

  • deploy/user_data/strategies/S2MomentumRotation.py + compose 服务 freqtrade-s2(FreqUI 8081,独立 SQLite)
  • 官方历史回测是 pandas 逐日 walker(排名只用 T-1 收盘,含 2022):487 笔,+20.5%,最大回撤 -91.6%
  • 对「回撤 <20%」不合格。只许 dry-run,不能上实盘

Dry-run

  • initial_state: running(S1 + S2)
  • Protections 三件套写进策略类(freqtrade 2026.6 不再读配置顶层)
  • use_custom_stoploss = true(S1 的 8%/5% 止损以前可能根本没挂上)

你需要在 VPS 上做的

本云端开发机没有 Docker,币安 API 返回 451,容器没法在这里拉起。

cd deploy
docker compose up -d
# S1 http://localhost:8080  S2 http://localhost:8081
# 两个 bot 都应是 running,不是 stopped

下载 15 对历史见 deploy/RUNBOOK.md

测试

296 passed, 2 skipped,覆盖率 90.81%(基线 274 passed)。

明确没做

  • 未重跑 freqtrade hyperopt(P1.4)
  • 未跑 jesse / lookahead-analysis
  • 未给 S2 加「BTC 跌破均线就空仓」——那会让回测变好看,需要你再拍板
  • 未切 live、未改 ADR-005、未动 max_open_trades / stoploss_on_exchange
Open in Web Open in Cursor 

User 2026-08-13: reject S1 silence, backtest+deploy S2, boot dry-run.

S1 adds EMA50 pullback reclaim beside golden cross, and a frozen 15-pair
USDT universe. S2 gets a freqtrade adapter, second compose service on
8081, and a point-in-time weekly rotation backtest (2022 included).

Research numbers (Yahoo daily): S1 161 trades but negative mean PnL;
S2 +20.5% with -91.6% max DD — paper-trade only. initial_state=running.

Co-authored-by: lazy <lazywc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants